//本文件由程序自动生成,请不要自行修改
using System;
using fastCSharp;

#if NotFastCSharpCode
#else
#pragma warning disable
namespace OnlineJudge.tcpClient
{
        public partial class Server
        {

            /// <summary>
            /// OJServer TCP服务参数
            /// </summary>
            public sealed class tcpServer
            {

                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                [fastCSharp.emit.boxSerialize]
                internal struct _o0 : fastCSharp.net.asynchronousMethod.IReturnParameter<OnlineJudge.JudgePoolConfig>
                {
                    [fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
                    [fastCSharp.emit.jsonParse.member(IsIgnoreCurrent = true)]
                    public OnlineJudge.JudgePoolConfig Ret;
                    public OnlineJudge.JudgePoolConfig Return
                    {
                        get { return Ret; }
                        set { Ret = value; }
                    }
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal struct _i1
                {
                    public OnlineJudge.JudgeReportBase item;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                [fastCSharp.emit.boxSerialize]
                internal struct _o2 : fastCSharp.net.asynchronousMethod.IReturnParameter<OnlineJudge.JudgeItemBase>
                {
                    [fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
                    [fastCSharp.emit.jsonParse.member(IsIgnoreCurrent = true)]
                    public OnlineJudge.JudgeItemBase Ret;
                    public OnlineJudge.JudgeItemBase Return
                    {
                        get { return Ret; }
                        set { Ret = value; }
                    }
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                [fastCSharp.emit.boxSerialize]
                internal struct _o3 : fastCSharp.net.asynchronousMethod.IReturnParameter<OnlineJudge.JudgeReportBase>
                {
                    [fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
                    [fastCSharp.emit.jsonParse.member(IsIgnoreCurrent = true)]
                    public OnlineJudge.JudgeReportBase Ret;
                    public OnlineJudge.JudgeReportBase Return
                    {
                        get { return Ret; }
                        set { Ret = value; }
                    }
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal struct _i4
                {
                    public string formatString;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                [fastCSharp.emit.boxSerialize]
                internal struct _o4 : fastCSharp.net.asynchronousMethod.IReturnParameter<bool>
                {
                    [fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
                    [fastCSharp.emit.jsonParse.member(IsIgnoreCurrent = true)]
                    public bool Ret;
                    public bool Return
                    {
                        get { return Ret; }
                        set { Ret = value; }
                    }
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal sealed class _i5
                {
                    public int problemId;
                    public int testId;
                    public string inData;
                    public string outData;
                    public System.DateTime problemTime;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal struct _i6
                {
                    public int problemId;
                    public int testId;
                    public System.DateTime problemTime;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal struct _i7
                {
                    public int problemId;
                    public System.DateTime problemTime;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal struct _i8
                {
                    public OnlineJudge.JudgeSetting value;
                    public System.DateTime problemTime;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal struct _i9
                {
                    public int problemId;
                    public System.DateTime problemTime;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                [fastCSharp.emit.boxSerialize]
                internal struct _o9 : fastCSharp.net.asynchronousMethod.IReturnParameter<bool>
                {
                    [fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
                    [fastCSharp.emit.jsonParse.member(IsIgnoreCurrent = true)]
                    public bool Ret;
                    public bool Return
                    {
                        get { return Ret; }
                        set { Ret = value; }
                    }
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                internal struct _i10
                {
                    public OnlineJudge.problemData data;
                    public System.DateTime problemTime;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false)]
                [fastCSharp.emit.boxSerialize]
                internal struct _o10 : fastCSharp.net.asynchronousMethod.IReturnParameter<bool>
                {
                    [fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
                    [fastCSharp.emit.jsonParse.member(IsIgnoreCurrent = true)]
                    public bool Ret;
                    public bool Return
                    {
                        get { return Ret; }
                        set { Ret = value; }
                    }
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false, IsReferenceMember = false)]
                internal struct _i11
                {
                    public ulong randomPrefix;
                    public byte[] md5Data;
                    public long ticks;
                }
                [fastCSharp.emit.dataSerialize(IsMemberMap = false, IsReferenceMember = false)]
                [fastCSharp.emit.boxSerialize]
                internal struct _o11 : fastCSharp.net.asynchronousMethod.IReturnParameter<bool>
                {
                    public long ticks;
                    [fastCSharp.emit.jsonSerialize.member(IsIgnoreCurrent = true)]
                    [fastCSharp.emit.jsonParse.member(IsIgnoreCurrent = true)]
                    public bool Ret;
                    public bool Return
                    {
                        get { return Ret; }
                        set { Ret = value; }
                    }
                }
            }

            /// <summary>
            /// TCP客户端
            /// </summary>
            public class tcpClient : fastCSharp.net.tcp.timeVerifyServer.ITimeVerifyClient, fastCSharp.net.tcp.commandClient.IClient
            {
                /// <summary>
                /// 时间验证服务客户端验证函数
                /// </summary>
                public sealed class timeVerifyMethod : fastCSharp.code.cSharp.tcpBase.ITcpClientVerifyMethod<tcpClient>
                {
                    /// <summary>
                    /// 时间验证服务客户端验证函数
                    /// </summary>
                    /// <param name="client">TCP调用客户端</param>
                    /// <returns>是否通过验证</returns>
                    public bool Verify(tcpClient client)
                    {
                        return fastCSharp.net.tcp.timeVerifyServer.Verify(client);
                    }
                }
                /// <summary>
                /// TCP调用客户端
                /// </summary>
                private fastCSharp.net.tcp.commandClient tcpCommandClient;
                /// <summary>
                /// TCP调用客户端
                /// </summary>
                public fastCSharp.net.tcp.commandClient TcpCommandClient { get { return tcpCommandClient; } }
                /// <summary>
                /// TCP调用客户端
                /// </summary>
                /// <param name="attribute">TCP调用服务器端配置信息</param>
                /// <param name="verifyMethod">TCP验证方法</param>
                public tcpClient(fastCSharp.code.cSharp.tcpServer attribute = null, fastCSharp.code.cSharp.tcpBase.ITcpClientVerifyMethod<tcpClient> verifyMethod = null)
                {
                    tcpCommandClient = new fastCSharp.net.tcp.commandClient<tcpClient>(attribute ?? fastCSharp.code.cSharp.tcpServer.GetConfig(TcpServerAttribute, "OJServer"), 28, verifyMethod ?? new OnlineJudge.tcpClient.Server.tcpClient.timeVerifyMethod(), this);
                }
                /// <summary>
                /// 释放资源
                /// </summary>
                public void Dispose()
                {
                    fastCSharp.pub.Dispose(ref tcpCommandClient);
                }

                /// <summary>
                /// TCP服务调用配置
                /// </summary>
                public static fastCSharp.code.cSharp.tcpServer TcpServerAttribute
                {
                    get { return fastCSharp.emit.jsonParser.Parse<fastCSharp.code.cSharp.tcpServer>(@"{""ClientCheckSeconds"":50,""ClientSegmentationCopyPath"":""D:\\OJ\\OnlineJudge\\OnlineJudgeClient\\"",""ClientSendSleep"":1,""Filter"":""NonPublicInstance"",""Host"":null,""HttpEncodingName"":null,""IsAttribute"":true,""IsBaseTypeAttribute"":false,""IsClientAsynchronousReceive"":false,""IsClientInterface"":false,""IsCompress"":true,""IsFixedClientHost"":false,""IsHttpClient"":false,""IsIdentityCommand"":true,""IsIgnoreCurrent"":false,""IsInheritAttribute"":true,""IsJsonSerialize"":false,""IsLoadBalancing"":false,""IsMarkData"":true,""IsPerpleRegister"":true,""IsRegisterCheckHost"":true,""IsRememberIdentityCommand"":true,""IsSegmentation"":true,""IsServer"":false,""IsServerAsynchronousReceive"":false,""IsSingleRegister"":true,""IsTryJsonSerializable"":false,""LoadBalancingCheckSeconds"":0,""LoadBalancingRouterRetrySeconds"":0,""LoadBalancingTryCount"":3,""MaxActiveClientCountIpAddress"":0,""MaxClientCount"":0x7FFFFFFF,""MaxClientCountPerIpAddress"":0,""MaxClientSendCount"":1024,""MaxServerSendCount"":1024,""MinReceivePerSecond"":0,""Port"":0,""ReceiveBufferSize"":4096,""ReceiveTimeout"":0,""RecieveCommandMinutes"":0,""RegisterHost"":null,""RegisterPort"":0,""SendBufferSize"":4096,""ServerSendSleep"":1,""Service"":""OJServer"",""TcpRegister"":null,""VerifySeconds"":20,""VerifyString"":null,""IsHttpClientOrJsonSerialize"":false,""IsSetup"":true,""MemberFilter"":""NonPublicInstance"",""ServiceName"":""OJServer"",""TcpRegisterName"":null,""TypeId"":{}}"); }
                }

                /// <summary>
                /// 忽略TCP分组
                /// </summary>
                /// <param name="groupId">分组标识</param>
                /// <returns>是否调用成功</returns>
                public fastCSharp.net.returnValue.type TcpIgnoreGroup(int groupId)
                {
                    fastCSharp.net.tcp.commandClient client = TcpCommandClient;
                    return client == null ? fastCSharp.net.returnValue.type.ClientDisposed : client.IgnoreGroup(groupId);
                }

                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c0 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 0 + 128, MaxInputSize = 0, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 启动服务
                /// </summary>
                public fastCSharp.net.returnValue<OnlineJudge.JudgePoolConfig> start()
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall<tcpServer._o0> _wait_ = fastCSharp.net.waitCall<tcpServer._o0>.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        start(null, false);
                        fastCSharp.net.returnValue<tcpServer._o0> _outputParameter_ = _wait_.Value;
                        if (_outputParameter_.Type == fastCSharp.net.returnValue.type.Success)
                        {
                            return _outputParameter_.Value.Return;
                        }
                        _returnType_ = _outputParameter_.Type;
                    }
                    return new fastCSharp.net.returnValue<OnlineJudge.JudgePoolConfig>{ Type = _returnType_ };
                }


                private void start(Action<fastCSharp.net.returnValue<tcpServer._o0>> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._o0 _outputParameter_ = new tcpServer._o0();
                            _socket_.Get(_onReturn_, _c0, _outputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue<tcpServer._o0>{ Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c1 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 1 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 添加测试
                /// </summary>
                public fastCSharp.net.returnValue judge(OnlineJudge.JudgeReportBase item)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall _wait_ = fastCSharp.net.waitCall.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        judge(item,null, false);
                        return _wait_.Value;
                    }
                    return new fastCSharp.net.returnValue{ Type = _returnType_ };
                }


                /// <summary>
                /// 添加测试
                /// </summary>
                [System.Runtime.CompilerServices.MethodImpl((System.Runtime.CompilerServices.MethodImplOptions)fastCSharp.pub.MethodImplOptionsAggressiveInlining)]
                public void judge(OnlineJudge.JudgeReportBase item, Action<fastCSharp.net.returnValue> _onReturn_)
                {
                    
                    judge(item, _onReturn_, true);
                }
                private void judge(OnlineJudge.JudgeReportBase item, Action<fastCSharp.net.returnValue> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i1 _inputParameter_ = new tcpServer._i1
                            {
                                item = item,
                            };
                            _socket_.Call<tcpServer._i1>(_onReturn_, _c1, ref _inputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue { Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c2 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 2 + 128, MaxInputSize = 0, IsKeepCallback = 1, IsSendOnly = 0 };

                /// <summary>
                /// 测试回调
                /// </summary>
                /// <returns>保持异步回调</returns>
                public fastCSharp.net.tcp.commandClient.streamCommandSocket.keepCallback onJudged(Action<fastCSharp.net.returnValue<OnlineJudge.JudgeItemBase>> _onReturn_)
                {
                    Action<fastCSharp.net.returnValue<tcpServer._o2>> _onOutput_ = null;
           //OnlineJudge.JudgeItemBase, tcpServer._o2>.Get(_onReturn_);
                    if (_onReturn_ == null || _onOutput_ != null)
                    {
                        
                        return onJudged(_onOutput_, false);
                    }
                    return null;
                }


                private fastCSharp.net.tcp.commandClient.streamCommandSocket.keepCallback onJudged(Action<fastCSharp.net.returnValue<tcpServer._o2>> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._o2 _outputParameter_ = new tcpServer._o2();
                            
                            return _socket_.Get(_onReturn_, _c2, _outputParameter_, _isTask_);
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue<tcpServer._o2>{ Type = _returnType_ });
                    return null;
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c3 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 3 + 128, MaxInputSize = 0, IsKeepCallback = 1, IsSendOnly = 0 };

                /// <summary>
                /// 测试回调
                /// </summary>
                /// <returns>保持异步回调</returns>
                public fastCSharp.net.tcp.commandClient.streamCommandSocket.keepCallback onJudged(Action<fastCSharp.net.returnValue<OnlineJudge.JudgeReportBase>> _onReturn_)
                {
                    Action<fastCSharp.net.returnValue<tcpServer._o3>> _onOutput_ = null;
           //OnlineJudge.JudgeReportBase, tcpServer._o3>.Get(_onReturn_);
                    if (_onReturn_ == null || _onOutput_ != null)
                    {
                        
                        return onJudged(_onOutput_, false);
                    }
                    return null;
                }


                private fastCSharp.net.tcp.commandClient.streamCommandSocket.keepCallback onJudged(Action<fastCSharp.net.returnValue<tcpServer._o3>> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._o3 _outputParameter_ = new tcpServer._o3();
                            
                            return _socket_.Get(_onReturn_, _c3, _outputParameter_, _isTask_);
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue<tcpServer._o3>{ Type = _returnType_ });
                    return null;
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c4 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 4 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 输入数据格式化字符串检测
                /// </summary>
                public fastCSharp.net.returnValue<bool> checkFormatString(string formatString)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall<tcpServer._o4> _wait_ = fastCSharp.net.waitCall<tcpServer._o4>.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        checkFormatString(formatString,null, false);
                        fastCSharp.net.returnValue<tcpServer._o4> _outputParameter_ = _wait_.Value;
                        if (_outputParameter_.Type == fastCSharp.net.returnValue.type.Success)
                        {
                            return _outputParameter_.Value.Return;
                        }
                        _returnType_ = _outputParameter_.Type;
                    }
                    return new fastCSharp.net.returnValue<bool>{ Type = _returnType_ };
                }


                private void checkFormatString(string formatString, Action<fastCSharp.net.returnValue<tcpServer._o4>> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i4 _inputParameter_ = new tcpServer._i4
                            {
                                formatString = formatString,
                            };
                            tcpServer._o4 _outputParameter_ = new tcpServer._o4();
                            _socket_.Get(_onReturn_, _c4, ref _inputParameter_, _outputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue<tcpServer._o4>{ Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c5 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 5 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 添加或者修改测试数据
                /// </summary>
                public fastCSharp.net.returnValue testData(int problemId, int testId, string inData, string outData, System.DateTime problemTime)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall _wait_ = fastCSharp.net.waitCall.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        testData(problemId, testId, inData, outData, problemTime,null, false);
                        return _wait_.Value;
                    }
                    return new fastCSharp.net.returnValue{ Type = _returnType_ };
                }


                /// <summary>
                /// 添加或者修改测试数据
                /// </summary>
                [System.Runtime.CompilerServices.MethodImpl((System.Runtime.CompilerServices.MethodImplOptions)fastCSharp.pub.MethodImplOptionsAggressiveInlining)]
                public void testData(int problemId, int testId, string inData, string outData, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_)
                {
                    
                    testData(problemId, testId, inData, outData, problemTime, _onReturn_, true);
                }
                private void testData(int problemId, int testId, string inData, string outData, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i5 _inputParameter_ = new tcpServer._i5
                            {
                                problemId = problemId,
                                testId = testId,
                                inData = inData,
                                outData = outData,
                                problemTime = problemTime,
                            };
                            _socket_.Call<tcpServer._i5>(_onReturn_, _c5, ref _inputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue { Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c6 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 6 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 删除测试数据
                /// </summary>
                public fastCSharp.net.returnValue deleteTestData(int problemId, int testId, System.DateTime problemTime)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall _wait_ = fastCSharp.net.waitCall.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        deleteTestData(problemId, testId, problemTime,null, false);
                        return _wait_.Value;
                    }
                    return new fastCSharp.net.returnValue{ Type = _returnType_ };
                }


                /// <summary>
                /// 删除测试数据
                /// </summary>
                [System.Runtime.CompilerServices.MethodImpl((System.Runtime.CompilerServices.MethodImplOptions)fastCSharp.pub.MethodImplOptionsAggressiveInlining)]
                public void deleteTestData(int problemId, int testId, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_)
                {
                    
                    deleteTestData(problemId, testId, problemTime, _onReturn_, true);
                }
                private void deleteTestData(int problemId, int testId, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i6 _inputParameter_ = new tcpServer._i6
                            {
                                problemId = problemId,
                                testId = testId,
                                problemTime = problemTime,
                            };
                            _socket_.Call<tcpServer._i6>(_onReturn_, _c6, ref _inputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue { Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c7 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 7 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 删除特判程序
                /// </summary>
                public fastCSharp.net.returnValue deleteSpecialProgarm(int problemId, System.DateTime problemTime)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall _wait_ = fastCSharp.net.waitCall.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        deleteSpecialProgarm(problemId, problemTime,null, false);
                        return _wait_.Value;
                    }
                    return new fastCSharp.net.returnValue{ Type = _returnType_ };
                }


                /// <summary>
                /// 删除特判程序
                /// </summary>
                [System.Runtime.CompilerServices.MethodImpl((System.Runtime.CompilerServices.MethodImplOptions)fastCSharp.pub.MethodImplOptionsAggressiveInlining)]
                public void deleteSpecialProgarm(int problemId, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_)
                {
                    
                    deleteSpecialProgarm(problemId, problemTime, _onReturn_, true);
                }
                private void deleteSpecialProgarm(int problemId, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i7 _inputParameter_ = new tcpServer._i7
                            {
                                problemId = problemId,
                                problemTime = problemTime,
                            };
                            _socket_.Call<tcpServer._i7>(_onReturn_, _c7, ref _inputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue { Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c8 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 8 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 设置问题测试参数
                /// </summary>
                public fastCSharp.net.returnValue setProblemJudgeSetting(OnlineJudge.JudgeSetting value, System.DateTime problemTime)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall _wait_ = fastCSharp.net.waitCall.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        setProblemJudgeSetting(value, problemTime,null, false);
                        return _wait_.Value;
                    }
                    return new fastCSharp.net.returnValue{ Type = _returnType_ };
                }


                /// <summary>
                /// 设置问题测试参数
                /// </summary>
                [System.Runtime.CompilerServices.MethodImpl((System.Runtime.CompilerServices.MethodImplOptions)fastCSharp.pub.MethodImplOptionsAggressiveInlining)]
                public void setProblemJudgeSetting(OnlineJudge.JudgeSetting value, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_)
                {
                    
                    setProblemJudgeSetting(value, problemTime, _onReturn_, true);
                }
                private void setProblemJudgeSetting(OnlineJudge.JudgeSetting value, System.DateTime problemTime, Action<fastCSharp.net.returnValue> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i8 _inputParameter_ = new tcpServer._i8
                            {
                                value = value,
                                problemTime = problemTime,
                            };
                            _socket_.Call<tcpServer._i8>(_onReturn_, _c8, ref _inputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue { Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c9 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 9 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 更新题目时间
                /// </summary>
                /// <param name="problemTime">问题更新时间</param>
                public fastCSharp.net.returnValue<bool> reworkProblemTime(int problemId, System.DateTime problemTime)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall<tcpServer._o9> _wait_ = fastCSharp.net.waitCall<tcpServer._o9>.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        reworkProblemTime(problemId, problemTime,null, false);
                        fastCSharp.net.returnValue<tcpServer._o9> _outputParameter_ = _wait_.Value;
                        if (_outputParameter_.Type == fastCSharp.net.returnValue.type.Success)
                        {
                            return _outputParameter_.Value.Return;
                        }
                        _returnType_ = _outputParameter_.Type;
                    }
                    return new fastCSharp.net.returnValue<bool>{ Type = _returnType_ };
                }


                private void reworkProblemTime(int problemId, System.DateTime problemTime, Action<fastCSharp.net.returnValue<tcpServer._o9>> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i9 _inputParameter_ = new tcpServer._i9
                            {
                                problemId = problemId,
                                problemTime = problemTime,
                            };
                            tcpServer._o9 _outputParameter_ = new tcpServer._o9();
                            _socket_.Get(_onReturn_, _c9, ref _inputParameter_, _outputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue<tcpServer._o9>{ Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c10 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 10 + 128, MaxInputSize = 2147483647, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 更新OJ数据
                /// </summary>
                public fastCSharp.net.returnValue<bool> reworkProblemData(OnlineJudge.problemData data, System.DateTime problemTime)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall<tcpServer._o10> _wait_ = fastCSharp.net.waitCall<tcpServer._o10>.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        reworkProblemData(data, problemTime,null, false);
                        fastCSharp.net.returnValue<tcpServer._o10> _outputParameter_ = _wait_.Value;
                        if (_outputParameter_.Type == fastCSharp.net.returnValue.type.Success)
                        {
                            return _outputParameter_.Value.Return;
                        }
                        _returnType_ = _outputParameter_.Type;
                    }
                    return new fastCSharp.net.returnValue<bool>{ Type = _returnType_ };
                }


                private void reworkProblemData(OnlineJudge.problemData data, System.DateTime problemTime, Action<fastCSharp.net.returnValue<tcpServer._o10>> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i10 _inputParameter_ = new tcpServer._i10
                            {
                                data = data,
                                problemTime = problemTime,
                            };
                            tcpServer._o10 _outputParameter_ = new tcpServer._o10();
                            _socket_.Get(_onReturn_, _c10, ref _inputParameter_, _outputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue<tcpServer._o10>{ Type = _returnType_ });
                }
                private static readonly fastCSharp.net.tcp.commandClient.identityCommand _c11 = new fastCSharp.net.tcp.commandClient.identityCommand { Command = 11 + 128, MaxInputSize = 1024, IsKeepCallback = 0, IsSendOnly = 0 };

                /// <summary>
                /// 时间验证函数
                /// </summary>
                /// <returns>是否验证成功</returns>
                public fastCSharp.net.returnValue<bool> verify(ulong randomPrefix, byte[] md5Data, ref long ticks)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    fastCSharp.net.waitCall<tcpServer._o11> _wait_ = fastCSharp.net.waitCall<tcpServer._o11>.Get();
                    if (_wait_ == null) _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                    else
                    {
                        
                        verify(randomPrefix, md5Data, ref ticks,null, false);
                        fastCSharp.net.returnValue<tcpServer._o11> _outputParameter_ = _wait_.Value;
                        if (_outputParameter_.Type == fastCSharp.net.returnValue.type.Success)
                        {
                            ticks = _outputParameter_.Value.ticks;
                            return _outputParameter_.Value.Return;
                        }
                        _returnType_ = _outputParameter_.Type;
                    }
                    return new fastCSharp.net.returnValue<bool>{ Type = _returnType_ };
                }


                private void verify(ulong randomPrefix, byte[] md5Data, ref long ticks, Action<fastCSharp.net.returnValue<tcpServer._o11>> _onReturn_, bool _isTask_)
                {
                    fastCSharp.net.returnValue.type _returnType_;
                    try
                    {
                        fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.VerifyStreamSocket;
                        if (_socket_ != null)
                        {
                            tcpServer._i11 _inputParameter_ = new tcpServer._i11
                            {
                                randomPrefix = randomPrefix,
                                md5Data = md5Data,
                                ticks = ticks,
                            };
                            tcpServer._o11 _outputParameter_ = new tcpServer._o11();
                            _outputParameter_.ticks = _inputParameter_.ticks;
                            _socket_.Get(_onReturn_, _c11, ref _inputParameter_, _outputParameter_, _isTask_);
                            return;
                        }
                        _returnType_ = fastCSharp.net.returnValue.type.ClientDisposed;
                    }
                    catch (Exception _error_)
                    {
                        _returnType_ = fastCSharp.net.returnValue.type.ClientException;
                        fastCSharp.log.Error.Add(_error_, null, false);
                    }
                    if (_onReturn_ != null) _onReturn_(new fastCSharp.net.returnValue<tcpServer._o11>{ Type = _returnType_ });
                }
            }

        }
}
#endif